import { request } from '@/api/request';
import { APIZP } from '@/common';

/**
 * @desc 简历设置列表
 */
type GradeType = {
  gradeColorBackground: string;
  gradeColorShape: string;
  sort: number;
  gradeName: string;
  startRatio: number;
  endRatio: number;
  showName: string;
  opennessLevel: string;
  opennessLevelArr: number[];
  charge?: number;
};
export const getResumeSet = () =>
  request<GradeType[]>({
    method: 'get',
    url: `${APIZP}resumeSetting/list`,
  });
/**
 * @desc  简历设置
 */
export const setResume = (data: any) =>
  request({
    url: `${APIZP}resumeSetting/edit`,
    data,
  });

export { GradeType };

export const SetResumeOptions = [
  { label: '司机学历', value: 1 },
  { label: '求职状态', value: 2 },
  { label: '工作经历', value: 3 },
  { label: '教育经历', value: 4 },
  { label: '获得证书', value: 5 },
];
